package com.intelligence.pda.retrofit;


import com.intelligence.pda.parameter.AbnormalSaveParameter;
import com.intelligence.pda.parameter.IntercityParameter;
import com.intelligence.pda.parameter.LandigkDetailParameter;
import com.intelligence.pda.parameter.LandingMatchParameter;
import com.intelligence.pda.parameter.LoginParameter;
import com.intelligence.pda.parameter.NewBasicStrParameter;
import com.intelligence.pda.parameter.OutstockDetailParameter;
import com.intelligence.pda.parameter.OutstockListParameter;
import com.intelligence.pda.parameter.OutstockSaveParameter;
import com.intelligence.pda.parameter.ResetNameParameter;
import com.intelligence.pda.parameter.ResetPasswordParameter;
import com.intelligence.pda.parameter.ResetPhonenumberParameter;
import com.intelligence.pda.parameter.StockSaveParameter;
import com.intelligence.pda.parameter.VerifycodeParameter;
import com.intelligence.pda.ui.abnormal.model.UploadPictureModel;
import com.intelligence.pda.ui.intercity.model.IntercityModel;
import com.intelligence.pda.ui.landing.model.LandingMatchModel;
import com.intelligence.pda.ui.login.model.LoginModel;
import com.intelligence.pda.ui.login.model.UserInfoModel;
import com.intelligence.pda.ui.modifyphone.model.VerifycodeModel;
import com.intelligence.pda.ui.scanlibrary.model.OutstockDetailModel;
import com.intelligence.pda.ui.scanlibrary.model.OutstockListModel;
import com.intelligence.pda.ui.signout.model.LoginOutModel;

import okhttp3.MultipartBody;
import retrofit2.http.Body;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import rx.Observable;

public interface ApiStores {
    //正式地址
//    String API_SERVER_URL = "https://hbs.hxunda.com/client/";
    //demo
    String API_SERVER_URL = "http://hbsdemo.hxunda.com/client/";
    //正广通
//    String API_SERVER_URL = "http://192.168.1.8:8288/clds-hbs2/client/";
    //外网
//    String API_SERVER_URL = "http://192.168.1.8:8181/clds-hbs2/client/";
    //liu
//    String API_SERVER_URL = "http://192.168.1.98:8080/clds-hbs2/client/";
    //图片地址
    String API_IMAGE_URL = API_SERVER_URL + "base/file/downloadpic?imageId=";

    /**
     * @LoginParameter 请求参数
     * @MainModel 返回格式
     ***/
    //登录
    @POST("pda/login")
    Observable<LoginModel> userLogin(@Body LoginParameter parameter);
    //用户信息
    @POST("pda/get")
    Observable<UserInfoModel> getUserInfo(@Body NewBasicStrParameter parameter);
    //退出登录
    @POST("party/apply/loginout")
    Observable<LoginOutModel> getLoginOut(@Body NewBasicStrParameter parameter);
    //退出登录
    @POST("pda/resetName")
    Observable<LoginOutModel> getResetName(@Body ResetNameParameter parameter);
    //修改密码
    @POST("pda/resetPassword")
    Observable<LoginOutModel> getResetPassword(@Body ResetPasswordParameter parameter);
    //验证码
    @POST("party/apply/verifycode")
    Observable<VerifycodeModel> getVerifycode(@Body VerifycodeParameter parameter);
    //修改手机号
    @POST("pda/resetPhonenumber")
    Observable<LoginOutModel> getResetPhonenumber(@Body ResetPhonenumberParameter parameter);
    //出库清单
    @POST("pda/outstockList")
    Observable<OutstockListModel> getoutstockList(@Body OutstockListParameter parameter);
    //出库清单明细
    @POST("pda/outstockDetail")
    Observable<OutstockDetailModel> getoutstockDetail(@Body OutstockDetailParameter parameter);
    //出库提交
    @POST("pda/outstockSave")
    Observable<LoginOutModel> getoutstockSave(@Body OutstockSaveParameter parameter);
    //上传图片
    @Multipart
    @POST("base/file/uploadpic")
    Observable<UploadPictureModel> getuploadPicture(@Part MultipartBody.Part upload);
    //异常登记
    @POST("pda/abnormalSave")
    Observable<LoginOutModel> getabnormalSave(@Body AbnormalSaveParameter parameter);
    //落地配待入库清单
    @POST("pda/lstockList")
    Observable<LandingMatchModel> getlstockList(@Body LandingMatchParameter parameter);
    //落地配待入库清单明细
    @POST("pda/lstockDetail")
    Observable<OutstockDetailModel> getlstockDetail(@Body LandigkDetailParameter parameter);
    //入库提交
    @POST("pda/stockSave")
    Observable<LoginOutModel> getstockSave(@Body StockSaveParameter parameter);
    //城际待入库清单
    @POST("pda/stockList")
    Observable<IntercityModel> getstockList(@Body LandingMatchParameter parameter);
    //城际待入库清单明细
    @POST("pda/stockDetail")
    Observable<OutstockDetailModel> getstockDetail(@Body IntercityParameter parameter);
}
